# Contributor: sillysausage <sillysausage@privatedemail.net>
# Maintainer:
pkgname=3proxy
pkgver=0.8.13
pkgrel=0
pkgdesc="Really tiny cross-platform proxy servers set"
url="https://3proxy.ru"
arch="all"
license="Apache-2.0 GPL-2.0-or-later LGPL-2.1-or-later"
pkgusers="3proxy"
pkggroups="3proxy"
options="!check" # No test suite
makedepends="linux-headers"
install="3proxy.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/z3APA3A/3proxy/archive/$pkgver.tar.gz
	$pkgname.initd
	"

build() {
	make -f Makefile.Linux prefix="/usr"
}

package() {
	make -f Makefile.Linux DESTDIR="$pkgdir" prefix="/usr" install
	install -Dm755 "$srcdir"/3proxy.initd "$pkgdir"/etc/init.d/3proxy
	mv "$pkgdir"/usr/etc/3proxy "$pkgdir"/etc/3proxy
	chown -R 3proxy:3proxy "$pkgdir"/etc/3proxy
	install -Dm644 copying "$pkgdir"/usr/share/licenses/$pkgname/COPYING

}

sha512sums="94b4a2568917c1d720276e38050a13e144d3e92ff41edd02eeebac0a6c21e6a839a58ea7dcb3abc03370e0f18452c953cfd7ad15ebac87e66b78d94fa52fbd79  3proxy-0.8.13.tar.gz
b3ae325013d37a021439bcacb42f5fa51440873b68ea8c42ef30d87df73d47c4426f7f96acf05c6e877f967c66d7ee65663889f8163dd5cf1ffec89344cb49c4  3proxy.initd"
